package admin_tag_api

import (
	"blog_go/models"
	"blog_go/models/res"
	"blog_go/service/common"
	"github.com/gin-gonic/gin"
	"github.com/sirupsen/logrus"
)

func (AdminTagApi) TagDel(c *gin.Context) {
	var delReq models.DeleteRequest
	if err := c.ShouldBindJSON(&delReq); err != nil {
		logrus.Error(err)
		panic(err)
	}
	count := common.ComDelete(models.TagModel{}, delReq)
	res.Ok("删除成功", count, c)
}
